home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / PACKET / DXNET3A5 / CLULINK.TXT next >
Encoding:
Text File  |  1997-11-18  |  4.5 KB  |  160 lines

  1. /*
  2. ********** Initiating a cluster link ***************************************************
  3.  
  4. Node A                    Node B
  5. 1. Makes connection
  6.  
  7.                     2. Sends PC18 protocol, including in the
  8.                     cluster information field the clulink 
  9.                     support identifier :
  10.                     PC18^CluLink 0.1^5449^~
  11.  
  12. 3. After identifying the protocol
  13. support identifier, sends the sends
  14. the protocol connection init string,
  15. switches to binary link mode, sends
  16. node and user table, finishes with
  17. message 0.
  18.         
  19.                     4. As soon as the protocol connection
  20.                     init string has been received, switches to
  21.                     binary link mode, sends node and user table,
  22.                     finishes with message 0.
  23.  
  24. ********** Description of the binary messages ******************************************
  25.  
  26. Protocol messages are binary, to save valuable network bandwidth. No CRC checking
  27. or message acking is normally done, since this should be done at lower layers.
  28.  
  29. First byte of a message is an unsigned char (BYTE) which indicate the length of the
  30. protocol message, in bytes. A protocol message can be up to 255 byte long. 
  31.  
  32. String are stored as pascal-type strings. The first byte indicates the actual length 
  33. of the string, then follows the string itself.
  34.  
  35. User and node callsigns are maximum 9 bytes longs (6 characters for the callsign, and
  36. 2 or 3 characters for the SSID if any).
  37.  
  38. Date and time are strored in two bytes, in format used by the rotten FAT file system.
  39. It's accurate to two seconds.
  40.  
  41.     Bits    Description
  42.     31-27    hours (0-23)
  43.     26-21    minutes
  44.     20-16    seconds divided by 2
  45.     15-9    year - 1980
  46.     8-5    month
  47.     4-0    day
  48.  
  49. The second byte of a message indicates the message type.
  50.  
  51. 0  -  Remote initialization completed.
  52.  
  53. 1  -  Add node(s)
  54.     Hop count:      byte
  55.     NodeCall:       pascal-type string
  56.     Software ID &
  57.     Node status:    byte
  58.                 bit 0 to 5 :
  59.                     1 - unknown
  60.                     2 - PacketCluster - type
  61.                     3 - Clusse
  62.                     4 - DxNet
  63.                 bit 6 - nohere ON
  64.                 bit 7 - conference mode ON
  65.     Version:    unsigned int
  66.                 version number is multiplied by 1000
  67.  
  68.     If there are more than one node to add, they'll be added following.
  69.  
  70.  
  71. 2  -  Delete node
  72.     Hop count:    byte
  73.     NodeCall:    pascal-type string
  74.     Reason:        byte
  75.                 0   - Shutdown
  76.                 1   - Disconnected by operateur
  77.                 2   - Hard disconnect
  78.                 255 - Special reason, the reason string follows ...
  79.     Reason String:    pascal-type string (maxlength 30)
  80.                 only send if Reason is 255.
  81.  
  82. 3  -  Add user(s)
  83.     Hop count:    byte
  84.     FromNode:    pascal-type string
  85.     UserCall:    pascal-type string
  86.     UserFlag:    byte
  87.                 Bit    Meaning        1    0
  88.                 bit 0 - Here status    here    not here
  89.                 bit 1 - Conf status    in    not in
  90.                 others are reserved
  91.  
  92.     If there are more than one user to add, they'll be added following.
  93.  
  94. 4  -  Delete user
  95.     Hop count:    byte
  96.     FromNode:    pascal-type string
  97.     UserCall:    pascal-type string
  98.  
  99. 10 -  Change user flag
  100.     Hop count:    byte
  101.     FromNode:    pascal-type string
  102.     UserCall:    pascal-type string
  103.     UserFlag:    byte (see message #3)
  104.  
  105. 11 -  Change user data
  106.     Hop count:    byte
  107.     FromNode:    pascal-type string
  108.     UserCall:    pascal-type string
  109.     DataType:    byte
  110.                 1 - Name (max length 22)
  111.                 2 - Qth  (max length 80)
  112.                 3 - Coordinates (not yet implemented in DxNet)
  113.                 4 - Home node (max length 9)
  114.                 5 - Locator (max length 6)
  115.     Info:        pascal-type string
  116.  
  117. 12 -  Ping message
  118.     Hop count:    byte
  119.     FromNode:    pascal-type string
  120.     ToNode:        pascal-type string
  121.     pingFlag:    byte
  122.                 0 - Answer for a ping
  123.                 1 - Ping
  124.  
  125. 64 - DX info
  126.     Hop count:    byte
  127.     FromNode:    pascal-type string (max 9 bytes)
  128.     FromUser:    pascal-type string (max 6 bytes, without SSID)
  129.     DxFreq:        unsigned long (4 bytes)
  130.                 Frequency of the DX station in KHz, multiplied by 10
  131.                 An integer is used to prevent rouding errors.
  132.     DxCall:        pascal-type string (max 14 bytes)
  133.     DateTime:    unsigned long
  134.     Comments:    unsigned string (max 30 bytes)
  135.  
  136. 66 - Announcement
  137.     Hop count:    byte
  138.     FromNode:    pascal-type string
  139.     FromUser:    pascal-type string
  140.     ToNode or
  141.         Distribution:    pascal-type string (max 20 bytes)                
  142.     DateTime:    unsigned long
  143.     Message flags:    byte
  144.                 Bit    Meaning
  145.                 bit 0 - Cluster-wide announcement
  146.                 bit 1 - To users connected to the specified cluster only
  147.                 bit 2 - To a distribution list of users        
  148.     Message:    pascal-type string (max 80 bytes)
  149.  
  150. 67 - Talk
  151.     FromNode:    pascal-type string (max 9 bytes)
  152.     FromUser:    pascal-type string (max 9 bytes)
  153.     ToNode:        pascal-type string (max 9 bytes)
  154.     ToUser:        pascal-type string (max 9 bytes)
  155.     DateTime:    unsigned long
  156.     Message flags:    byte
  157.                 Bit    Meaning        ON    OFF
  158.                 bit 0 - Bell flag    1    0
  159.     Message:    pascal-type string (max 80 bytes)
  160.